﻿<UserControl x:Class="Cjc.SilverGlulxe.SaveLoadPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<Grid x:Name="LayoutRoot" Background="#80000000">

		<Border Grid.Row="1" Grid.Column="1" CornerRadius="10"
				HorizontalAlignment="Center" VerticalAlignment="Center" Padding="10">

			<Border.Background>
				<LinearGradientBrush>
					<GradientStop Offset="0" Color="#FFF0F0FF"/>
					<GradientStop Offset="1" Color="#50F0F0FF"/>
				</LinearGradientBrush>
			</Border.Background>

			<Grid>

				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>

				<TextBlock x:Name="title" x:FieldModifier="private" Grid.Row="0" HorizontalAlignment="Center" Margin="0,0,0,10" FontSize="18"/>

				<TextBlock Grid.Row="1" Text="Saved games" Margin="0,0,0,5"/>

				<ListBox x:Name="gameSaves" Grid.Row="2" MinHeight="200" TabIndex="1" MinWidth="300" SelectionChanged="OnFileSelected" KeyDown="OnKeyDown">
					<ListBox.ItemTemplate>
						<DataTemplate>
							<TextBlock Text="{Binding}"/>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>

				<Grid Grid.Row="3" Margin="0,5,0,0">

					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>

					<TextBlock Grid.Column="0" Text="Name" Margin="0,0,5,0" VerticalAlignment="Center"/>
					<TextBox x:Name="saveName" x:FieldModifier="private" TabIndex="0" Grid.Column="1" VerticalAlignment="Center" KeyDown="OnKeyDown" />

				</Grid>

				<StackPanel Orientation="Horizontal" Grid.Row="4" HorizontalAlignment="Center" Margin="0,5,0,0">
					<Button x:Name="button" x:FieldModifier="private" TabIndex="2" Click="OnClick" Margin="0,0,5,0" Padding="10"/>
					<Button x:FieldModifier="private" Click="OnCancel" TabIndex="3" Content="Cancel" Padding="10"/>
				</StackPanel>

			</Grid>

		</Border>

	</Grid>

</UserControl>
